package com.liang.exam.mapper;


import com.liang.exam.entity.Exam;
import com.liang.exam.entity.ExamStudent;
import com.liang.exam.entity.Teacher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TeacherMapper {

    // 根据账号查找教师信息
    Teacher findByAccount(String account);

    void createExam( Exam exam);


    Exam getExamInfo(Integer examId);

    void updateExam(Exam exam);

    List<Exam> selectAll(Integer teacherId);

    void deleteExam(Integer examId);

    List<Exam> searchExam(Exam exam);

    void updateExamStatus(Integer examId);

    Teacher findById(int teacherId);

    void updatePassword(String password, int teacherId);

    List<ExamStudent> selectExamStudent(Integer id);

    void addStudentExam(ExamStudent examStudent);

    int addStudentExamList(@Param("studentExam") List<ExamStudent> studentExam, @Param("examId") String examId);

    List<ExamStudent> findStudentExam(ExamStudent examStudent);

    void deleteStudent(Integer id);
}
